<!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
		<title>SmartFox2XClient Class Reference</title>
		<meta id="xcode-display" name="xcode-display" content="render"/>
		<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
		<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
		<meta name="generator" content="appledoc 2.2 (build 963)" />
	</head>
	<body>
		<header id="top_header">
			<div id="library" class="hideInXcode">
				<h1><a id="libraryTitle" href="../index.html">SFS2X API v1.3.7 </a></h1>
				<a id="developerHome" href="../index.html">gotoAndPlay() / A51 Integrated</a>
			</div>
			
			<div id="title" role="banner">
				<h1 class="hideInXcode">SmartFox2XClient Class Reference</h1>
			</div>
			<ul id="headerButtons" role="toolbar">
				<li id="toc_button">
					<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
				</li>
				<li id="jumpto_button" role="navigation">
					<select id="jumpTo">
	<option value="top">Jump To&#133;</option>
	
	<option value="overview">Overview</option>
	
	
	
	
	<option value="tasks">Tasks</option>
	
	
	
	
	
	<option value="properties">Properties</option>
	
	<option value="//api/name/buddyManager">&nbsp;&nbsp;&nbsp;&nbsp;buddyManager</option>
	
	<option value="//api/name/compressionThreshold">&nbsp;&nbsp;&nbsp;&nbsp;compressionThreshold</option>
	
	<option value="//api/name/config">&nbsp;&nbsp;&nbsp;&nbsp;config</option>
	
	<option value="//api/name/connectionMode">&nbsp;&nbsp;&nbsp;&nbsp;connectionMode</option>
	
	<option value="//api/name/currentIp">&nbsp;&nbsp;&nbsp;&nbsp;currentIp</option>
	
	<option value="//api/name/currentPort">&nbsp;&nbsp;&nbsp;&nbsp;currentPort</option>
	
	<option value="//api/name/currentZone">&nbsp;&nbsp;&nbsp;&nbsp;currentZone</option>
	
	<option value="//api/name/debug">&nbsp;&nbsp;&nbsp;&nbsp;debug</option>
	
	<option value="//api/name/isConnected">&nbsp;&nbsp;&nbsp;&nbsp;isConnected</option>
	
	<option value="//api/name/joinedRooms">&nbsp;&nbsp;&nbsp;&nbsp;joinedRooms</option>
	
	<option value="//api/name/lastJoinedRoom">&nbsp;&nbsp;&nbsp;&nbsp;lastJoinedRoom</option>
	
	<option value="//api/name/logger">&nbsp;&nbsp;&nbsp;&nbsp;logger</option>
	
	<option value="//api/name/mySelf">&nbsp;&nbsp;&nbsp;&nbsp;mySelf</option>
	
	<option value="//api/name/roomList">&nbsp;&nbsp;&nbsp;&nbsp;roomList</option>
	
	<option value="//api/name/roomManager">&nbsp;&nbsp;&nbsp;&nbsp;roomManager</option>
	
	<option value="//api/name/sessionToken">&nbsp;&nbsp;&nbsp;&nbsp;sessionToken</option>
	
	<option value="//api/name/useBlueBox">&nbsp;&nbsp;&nbsp;&nbsp;useBlueBox</option>
	
	<option value="//api/name/userManager">&nbsp;&nbsp;&nbsp;&nbsp;userManager</option>
	
	<option value="//api/name/version">&nbsp;&nbsp;&nbsp;&nbsp;version</option>
	
	
	
	
	<option value="class_methods">Class Methods</option>
	
	<option value="//api/name/smartFoxWithDebugMode:delegate:">&nbsp;&nbsp;&nbsp;&nbsp;+ smartFoxWithDebugMode:delegate:</option>
	
	
	
	
	<option value="instance_methods">Instance Methods</option>
	
	<option value="//api/name/connect">&nbsp;&nbsp;&nbsp;&nbsp;- connect</option>
	
	<option value="//api/name/connect:port:">&nbsp;&nbsp;&nbsp;&nbsp;- connect:port:</option>
	
	<option value="//api/name/connectWithConfig:">&nbsp;&nbsp;&nbsp;&nbsp;- connectWithConfig:</option>
	
	<option value="//api/name/disconnect">&nbsp;&nbsp;&nbsp;&nbsp;- disconnect</option>
	
	<option value="//api/name/enableLagMonitor:">&nbsp;&nbsp;&nbsp;&nbsp;- enableLagMonitor:</option>
	
	<option value="//api/name/enableLagMonitorWithInterval:interval:queueSize:">&nbsp;&nbsp;&nbsp;&nbsp;- enableLagMonitorWithInterval:interval:queueSize:</option>
	
	<option value="//api/name/getRoomById:">&nbsp;&nbsp;&nbsp;&nbsp;- getRoomById:</option>
	
	<option value="//api/name/getRoomByName:">&nbsp;&nbsp;&nbsp;&nbsp;- getRoomByName:</option>
	
	<option value="//api/name/getRoomListFromGroup:">&nbsp;&nbsp;&nbsp;&nbsp;- getRoomListFromGroup:</option>
	
	<option value="//api/name/httpUploadURI">&nbsp;&nbsp;&nbsp;&nbsp;- httpUploadURI</option>
	
	<option value="//api/name/initSmartFoxWithDebugMode:delegate:">&nbsp;&nbsp;&nbsp;&nbsp;- initSmartFoxWithDebugMode:delegate:</option>
	
	<option value="//api/name/initUDP:::">&nbsp;&nbsp;&nbsp;&nbsp;- initUDP:::</option>
	
	<option value="//api/name/killConnection">&nbsp;&nbsp;&nbsp;&nbsp;- killConnection</option>
	
	<option value="//api/name/loadConfig:connectOnSuccess:">&nbsp;&nbsp;&nbsp;&nbsp;- loadConfig:connectOnSuccess:</option>
	
	<option value="//api/name/send:">&nbsp;&nbsp;&nbsp;&nbsp;- send:</option>
	
	<option value="//api/name/setClientDetails:::">&nbsp;&nbsp;&nbsp;&nbsp;- setClientDetails:::</option>
	
	
	
</select>
				</li>
			</ul>
		</header>
		<nav id="tocContainer" class="isShowingTOC">
			<ul id="toc" role="tree">
				
<li role="treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#overview">Overview</a></span></li>




<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
	
</ul></li>





<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#properties">Properties</a></span><ul>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/buddyManager">buddyManager</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/compressionThreshold">compressionThreshold</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/config">config</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/connectionMode">connectionMode</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/currentIp">currentIp</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/currentPort">currentPort</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/currentZone">currentZone</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/debug">debug</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/isConnected">isConnected</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/joinedRooms">joinedRooms</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/lastJoinedRoom">lastJoinedRoom</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/logger">logger</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/mySelf">mySelf</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/roomList">roomList</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/roomManager">roomManager</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/sessionToken">sessionToken</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/useBlueBox">useBlueBox</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/userManager">userManager</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/version">version</a></span></li>
	
</ul></li>



<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#class_methods">Class Methods</a></span><ul>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/smartFoxWithDebugMode:delegate:">smartFoxWithDebugMode:delegate:</a></span></li>
	
</ul></li>



<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/connect">connect</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/connect:port:">connect:port:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/connectWithConfig:">connectWithConfig:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/disconnect">disconnect</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/enableLagMonitor:">enableLagMonitor:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/enableLagMonitorWithInterval:interval:queueSize:">enableLagMonitorWithInterval:interval:queueSize:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/getRoomById:">getRoomById:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/getRoomByName:">getRoomByName:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/getRoomListFromGroup:">getRoomListFromGroup:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/httpUploadURI">httpUploadURI</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/initSmartFoxWithDebugMode:delegate:">initSmartFoxWithDebugMode:delegate:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/initUDP:::">initUDP:::</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/killConnection">killConnection</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/loadConfig:connectOnSuccess:">loadConfig:connectOnSuccess:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/send:">send:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setClientDetails:::">setClientDetails:::</a></span></li>
	
</ul></li>


			</ul>
		</nav>
		<article>
			<div id="contents" class="isShowingTOC" role="main">
				<a title="SmartFox2XClient Class Reference" name="top"></a>
				<div class="main-navigation navigation-top">
					<ul>
	<li><a href="../index.html">Index</a></li>
	<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
				</div>
				<div id="header">
					<div class="section-header">
						<h1 class="title title-header">SmartFox2XClient Class Reference</h1>
					</div>		
				</div>
				<div id="container">	
					
					<div class="section section-specification"><table cellspacing="0"><tbody>
						<tr>
	<td class="specification-title">Inherits from</td>
	<td class="specification-value">NSObject</td>
</tr><tr>
	<td class="specification-title">Conforms to</td>
	<td class="specification-value">IBitSwarmEvents<br />IConfigLoader</td>
</tr><tr>
	<td class="specification-title">Declared in</td>
	<td class="specification-value">SmartFox2XClient.h<br />SmartFox2XClient.m</td>
</tr>
						</tbody></table></div>
					
                    
                    
					
					<div class="section section-overview">
						<a title="Overview" name="overview"></a>
						<h2 class="subtitle subtitle-overview">Overview</h2>
						<p>SmartFox2XClient is the main class in the SFS2X API.</p>

<p>This class is responsible for connecting to the Server and dispatching all asynchronous events.</p><div class="warning"><p><strong>Warning:</strong> <em><b>Important:</b></em> in the provided examples, <b>smartFox</b> always indicates a SmartFox2XClient instance.</p></div>
					</div>
					
					
					
					
					
					<div class="section section-tasks">
						<a title="Tasks" name="tasks"></a>
						<h2 class="subtitle subtitle-tasks">Tasks</h2>
						
						
						
						

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/buddyManager">&nbsp;&nbsp;buddyManager</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/compressionThreshold">&nbsp;&nbsp;compressionThreshold</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/config">&nbsp;&nbsp;config</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/currentIp">&nbsp;&nbsp;currentIp</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/currentPort">&nbsp;&nbsp;currentPort</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/currentZone">&nbsp;&nbsp;currentZone</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/debug">&nbsp;&nbsp;debug</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/useBlueBox">&nbsp;&nbsp;useBlueBox</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/isConnected">&nbsp;&nbsp;isConnected</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/connectionMode">&nbsp;&nbsp;connectionMode</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/joinedRooms">&nbsp;&nbsp;joinedRooms</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/lastJoinedRoom">&nbsp;&nbsp;lastJoinedRoom</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/logger">&nbsp;&nbsp;logger</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/mySelf">&nbsp;&nbsp;mySelf</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/roomList">&nbsp;&nbsp;roomList</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/roomManager">&nbsp;&nbsp;roomManager</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/sessionToken">&nbsp;&nbsp;sessionToken</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/userManager">&nbsp;&nbsp;userManager</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/version">&nbsp;&nbsp;version</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/initSmartFoxWithDebugMode:delegate:">&ndash;&nbsp;initSmartFoxWithDebugMode:delegate:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/smartFoxWithDebugMode:delegate:">+&nbsp;smartFoxWithDebugMode:delegate:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/connect">&ndash;&nbsp;connect</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/connect:port:">&ndash;&nbsp;connect:port:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/connectWithConfig:">&ndash;&nbsp;connectWithConfig:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/disconnect">&ndash;&nbsp;disconnect</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/killConnection">&ndash;&nbsp;killConnection</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/enableLagMonitor:">&ndash;&nbsp;enableLagMonitor:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/enableLagMonitorWithInterval:interval:queueSize:">&ndash;&nbsp;enableLagMonitorWithInterval:interval:queueSize:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/httpUploadURI">&ndash;&nbsp;httpUploadURI</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/loadConfig:connectOnSuccess:">&ndash;&nbsp;loadConfig:connectOnSuccess:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/send:">&ndash;&nbsp;send:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/getRoomById:">&ndash;&nbsp;getRoomById:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/getRoomByName:">&ndash;&nbsp;getRoomByName:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/getRoomListFromGroup:">&ndash;&nbsp;getRoomListFromGroup:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/initUDP:::">&ndash;&nbsp;initUDP:::</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/setClientDetails:::">&ndash;&nbsp;setClientDetails:::</a></code>
	</span>
	
	
</li>
						</ul>
						
					</div>
					
					
					
					
					
					<div class="section section-methods">
						<a title="Properties" name="properties"></a>
						<h2 class="subtitle subtitle-methods">Properties</h2>
						
						<div class="section-method">
	<a name="//api/name/buddyManager" title="buddyManager"></a>
	<h3 class="subsubtitle method-title">buddyManager</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns the Buddy Manager.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (strong) id&lt;IBuddyManager&gt; buddyManager</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Returns the Buddy Manager.</p>
	</div>
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="../Classes/SFSBuddyManager.html">SFSBuddyManager</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/compressionThreshold" title="compressionThreshold"></a>
	<h3 class="subsubtitle method-title">compressionThreshold</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns the current compression threshold.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (readonly) NSInteger compressionThreshold</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Returns the current compression threshold.</p>

<p>The value represent the maximum message size (in bytes) before the protocol compression is activated.
The value is determined by the server configuration.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/config" title="config"></a>
	<h3 class="subsubtitle method-title">config</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Get the current client configuration.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (strong) ConfigData *config</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Get the current client configuration.</p>

<p>It can return null if the configuration was not loaded.</p>
	</div>
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="#//api/name/loadConfig:connectOnSuccess:">- loadConfig:connectOnSuccess:</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/connectionMode" title="connectionMode"></a>
	<h3 class="subsubtitle method-title">connectionMode</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns the mode of the connection (Socket or HTTP)</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (weak, readonly) NSString *connectionMode</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Returns the mode of the connection (Socket or HTTP)</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/currentIp" title="currentIp"></a>
	<h3 class="subsubtitle method-title">currentIp</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>The address where the client is connected (if the client is connected)</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (weak, readonly) NSString *currentIp</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>The address where the client is connected (if the client is connected)</p>
	</div>
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="#//api/name/connect:port:">- connect:port:</a></p></code></li>
			
			<li><code><p><a href="#//api/name/loadConfig:connectOnSuccess:">- loadConfig:connectOnSuccess:</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/currentPort" title="currentPort"></a>
	<h3 class="subsubtitle method-title">currentPort</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>The TCP port of the server where the client is connected (if the client is connected)</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (readonly) NSInteger currentPort</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>The TCP port of the server where the client is connected (if the client is connected)</p>
	</div>
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="#//api/name/loadConfig:connectOnSuccess:">- loadConfig:connectOnSuccess:</a></p></code></li>
			
			<li><code><p><a href="../Classes/LoginRequest.html">LoginRequest</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/currentZone" title="currentZone"></a>
	<h3 class="subsubtitle method-title">currentZone</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>The current Zone in use, if user is logged in</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (strong) NSString *currentZone</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>The current Zone in use, if user is logged in</p>
	</div>
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="#//api/name/loadConfig:connectOnSuccess:">- loadConfig:connectOnSuccess:</a></p></code></li>
			
			<li><code><p><a href="../Classes/LoginRequest.html">LoginRequest</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/debug" title="debug"></a>
	<h3 class="subsubtitle method-title">debug</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>When set to true, provides detailed debugging data for all incoming/outgoing messages</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (assign) BOOL debug</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>When set to true, provides detailed debugging data for all incoming/outgoing messages</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/isConnected" title="isConnected"></a>
	<h3 class="subsubtitle method-title">isConnected</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns true if the client connection is active</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (readonly) BOOL isConnected</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Returns true if the client connection is active</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/joinedRooms" title="joinedRooms"></a>
	<h3 class="subsubtitle method-title">joinedRooms</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns a list of Rooms currently joined by the client</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (weak, readonly) NSMutableArray *joinedRooms</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Returns a list of Rooms currently joined by the client</p>
	</div>
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="../Classes/JoinRoomRequest.html">JoinRoomRequest</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/lastJoinedRoom" title="lastJoinedRoom"></a>
	<h3 class="subsubtitle method-title">lastJoinedRoom</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Return the last joined Room, if any.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (strong) id&lt;Room&gt; lastJoinedRoom</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Return the last joined Room, if any.</p>

<p>Null is returned if there&rsquo;s no currently joined Room.</p>
	</div>
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="../Classes/JoinRoomRequest.html">JoinRoomRequest</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/logger" title="logger"></a>
	<h3 class="subsubtitle method-title">logger</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Get a reference to the logger</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (weak, readonly) Logger *logger</code></div>

    
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>the logger</p>
	</div>
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Get a reference to the logger</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/mySelf" title="mySelf"></a>
	<h3 class="subsubtitle method-title">mySelf</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>This User object represents the User connected to SmartFoxServer 2X</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (strong) id&lt;User&gt; mySelf</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>This User object represents the User connected to SmartFoxServer 2X</p>
	</div>
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="../Classes/LoginRequest.html">LoginRequest</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/roomList" title="roomList"></a>
	<h3 class="subsubtitle method-title">roomList</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns the list of Rooms currently &ldquo;watched&rdquo; by the client.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (weak, readonly) NSArray *roomList</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Returns the list of Rooms currently &ldquo;watched&rdquo; by the client.</p>

<p>The list will contain all the Rooms that are currently joined and all the Rooms from the Room Groups that are subscribed.
At login time the User is automatically subscribed to all Room Groups specified in the Zone&rsquo;s <em>Default Groups</em> setting.</p>
	</div>
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="../Classes/SubscribeRoomGroupRequest.html">SubscribeRoomGroupRequest</a></p></code></li>
			
			<li><code><p><a href="../Classes/UnsubscribeRoomGroupRequest.html">UnsubscribeRoomGroupRequest</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/roomManager" title="roomManager"></a>
	<h3 class="subsubtitle method-title">roomManager</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns the Room Manager.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (strong) id&lt;IRoomManager&gt; roomManager</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Returns the Room Manager.</p>
	</div>
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="../Classes/SFSRoomManager.html">SFSRoomManager</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/sessionToken" title="sessionToken"></a>
	<h3 class="subsubtitle method-title">sessionToken</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns the unique session token.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (strong) NSString *sessionToken</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Returns the unique session token.</p>

<p>The Session token is a String sent by the server to the client after the initial handshake.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/useBlueBox" title="useBlueBox"></a>
	<h3 class="subsubtitle method-title">useBlueBox</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns true if the client connection is http tunnelled</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (assign) BOOL useBlueBox</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Returns true if the client connection is http tunnelled</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/userManager" title="userManager"></a>
	<h3 class="subsubtitle method-title">userManager</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns the User Manager.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (strong) id&lt;IUserManager&gt; userManager</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Returns the User Manager.</p>
	</div>
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="../Classes/SFSUserManager.html">SFSUserManager</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/version" title="version"></a>
	<h3 class="subsubtitle method-title">version</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Return the API current version</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (weak, readonly) NSString *version</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Return the API current version</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
					</div>
					
					
					
					<div class="section section-methods">
						<a title="Class Methods" name="class_methods"></a>
						<h2 class="subtitle subtitle-methods">Class Methods</h2>
						
						<div class="section-method">
	<a name="//api/name/smartFoxWithDebugMode:delegate:" title="smartFoxWithDebugMode:delegate:"></a>
	<h3 class="subsubtitle method-title">smartFoxWithDebugMode:delegate:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Initializes and returns SmartFox2XClient instance.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>+ (id)smartFoxWithDebugMode:(BOOL)<em>debug</em> delegate:(id&lt;ISFSEvents&gt;)<em>delegate</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>debug</em></dt>
			<dd><p>(BOOL) determines debugging mode.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>delegate</em></dt>
			<dd><p>(id <a href="../Protocols/ISFSEvents.html">ISFSEvents</a>) delegate object that listens api events.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Initializes and returns SmartFox2XClient instance.</p>
	</div>
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="#//api/name/initSmartFoxWithDebugMode:delegate:">- initSmartFoxWithDebugMode:delegate:</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
					</div>
					
					
					
					<div class="section section-methods">
						<a title="Instance Methods" name="instance_methods"></a>
						<h2 class="subtitle subtitle-methods">Instance Methods</h2>
						
						<div class="section-method">
	<a name="//api/name/connect" title="connect"></a>
	<h3 class="subsubtitle method-title">connect</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Establish connection with SmartFoxServer 2X.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (void)connect</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Establish connection with SmartFoxServer 2X.</p>

<p>Client will use the settings loaded via loadConfig</p>
	</div>
	
	
	
	<div class="method-subsection arguments-section exceptions">
		<h4 class="method-subtitle exception-title">Exceptions</h4>
		
		<dl class="argument-def exception-def">
			<dt><em>NSException</em></dt>
			<dd><p>if host/address or port in the config file is invalid.</p></dd>
		</dl>
		
	</div>
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="#//api/name/loadConfig:connectOnSuccess:">- loadConfig:connectOnSuccess:</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/connect:port:" title="connect:port:"></a>
	<h3 class="subsubtitle method-title">connect:port:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Establish connection with SmartFoxServer 2X.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (void)connect:(NSString *)<em>host</em> port:(int)<em>port</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>host</em></dt>
			<dd><p>(NSString *) the address of the server to connect to</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>port</em></dt>
			<dd><p>(NSInteger) the TCP port (default port used by SFS2X is 9933)</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Establish connection with SmartFoxServer 2X.</p>

<p>Client will use the settings loaded via loadConfig if you pass nil value for host or -1 for port.</p>
	</div>
	
	
	
	<div class="method-subsection arguments-section exceptions">
		<h4 class="method-subtitle exception-title">Exceptions</h4>
		
		<dl class="argument-def exception-def">
			<dt><em>NSException</em></dt>
			<dd><p>if an invalid host/address or port is passed</p></dd>
		</dl>
		
	</div>
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="#//api/name/connect">- connect</a></p></code></li>
			
			<li><code><p><a href="#//api/name/loadConfig:connectOnSuccess:">- loadConfig:connectOnSuccess:</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/connectWithConfig:" title="connectWithConfig:"></a>
	<h3 class="subsubtitle method-title">connectWithConfig:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Establish connection with SmartFoxServer 2X using a defined Configuration Object</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (void)connectWithConfig:(ConfigData *)<em>cfg</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>cfg</em></dt>
			<dd><p>(ConfigData *) configuration paramaters (host, port, etc)</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Establish connection with SmartFoxServer 2X using a defined Configuration Object</p>

<p>Client will use the settings loaded via loadConfig if you pass nil value for host or -1 for port.</p>
	</div>
	
	
	
	<div class="method-subsection arguments-section exceptions">
		<h4 class="method-subtitle exception-title">Exceptions</h4>
		
		<dl class="argument-def exception-def">
			<dt><em>NSException</em></dt>
			<dd><p>if an invalid host/address or port is passed</p>

<p><b>Example:</b><br/>
The following example shows how to pass a ConfigData object to connect directly with SFS 2X.</p>

<pre><code>smartFox = [[SmartFox2XClient alloc] initSmartFoxWithDebugMode:YES delegate:self];

ConfigData *cfg = [[ConfigData alloc] init];
cfg.host = @"127.0.0.1";
cfg.port = 9933;
cfg.zone = @"BasicExamples";
cfg.useBlueBox = YES;

// Start connection
[smartFox connectWithConfig:cfg];
</code></pre></dd>
		</dl>
		
	</div>
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="../Classes/ConfigData.html">ConfigData</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/disconnect" title="disconnect"></a>
	<h3 class="subsubtitle method-title">disconnect</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Disconnect from SmartFoxServer.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (void)disconnect</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Disconnect from SmartFoxServer.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/enableLagMonitor:" title="enableLagMonitor:"></a>
	<h3 class="subsubtitle method-title">enableLagMonitor:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Enable the lag monitor.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (void)enableLagMonitor:(BOOL)<em>enabled</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>enabled</em></dt>
			<dd><p>(BOOL) toggles the state of the Lag Monitor</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Enable the lag monitor.</p>

<p>Toggles the automatic realtime monitoring of the lag between the client and the server (round robin).
When turned on, the <em>ISFSEvent.onPingPong</em> event is called every 4 seconds, providing the average of the last ten measured lag values.</p>

<p>The Lag Monitor can be activated after the client has successfully logged in the Server.
The monitoring is automatically turned off when the user logs out of a Zone or gets disconnected.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/enableLagMonitorWithInterval:interval:queueSize:" title="enableLagMonitorWithInterval:interval:queueSize:"></a>
	<h3 class="subsubtitle method-title">enableLagMonitorWithInterval:interval:queueSize:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Enable the lag monitor with custom settings</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (void)enableLagMonitorWithInterval:(BOOL)<em>enabled</em> interval:(NSInteger)<em>interval</em> queueSize:(NSInteger)<em>qSize</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>enabled</em></dt>
			<dd><p>(BOOL) toggles the state of the Lag Monitor</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>interval</em></dt>
			<dd><p>(NSInteger) the number of seconds between each roundtrip calls (default = 4)</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>qSize</em></dt>
			<dd><p>(NSInteger) the number of measuerments kept in the local queue upon which the average is calculated (default = 10)</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Enable the lag monitor with custom settings</p>

<p>Toggles the automatic realtime monitoring of the lag between the client and the server (round robin) with custom settings.</p>

<p>The Lag Monitor can be activated after the client has successfully logged in the Server.
The monitoring is automatically turned off when the user logs out of a Zone or gets disconnected.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/getRoomById:" title="getRoomById:"></a>
	<h3 class="subsubtitle method-title">getRoomById:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Finds a Room from its Id or returns nil if no Room with that Id exist in the room list</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (id&lt;Room&gt;)getRoomById:(NSInteger)<em>roomId</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>roomId</em></dt>
			<dd><p>(NSInteger) the id of the room.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Finds a Room from its Id or returns nil if no Room with that Id exist in the room list</p>
	</div>
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="#//api/name/roomList">@property roomList</a></p></code></li>
			
			<li><code><p><a href="../Classes/SFSRoom.html">SFSRoom</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/getRoomByName:" title="getRoomByName:"></a>
	<h3 class="subsubtitle method-title">getRoomByName:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Finds a Room from its name or returns nil if no Room with that name exist in the room list</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (id&lt;Room&gt;)getRoomByName:(NSString *)<em>roomName</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>roomName</em></dt>
			<dd><p>(NSString *) the name of the room.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Finds a Room from its name or returns nil if no Room with that name exist in the room list</p>
	</div>
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="#//api/name/roomList">@property roomList</a></p></code></li>
			
			<li><code><p><a href="../Classes/SFSRoom.html">SFSRoom</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/getRoomListFromGroup:" title="getRoomListFromGroup:"></a>
	<h3 class="subsubtitle method-title">getRoomListFromGroup:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Return the list of Rooms from a specific Room Group</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (NSArray *)getRoomListFromGroup:(NSString *)<em>groupId</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>groupId</em></dt>
			<dd><p>(NSString *)the name of the Group</p></dd>
		</dl>
		
	</div>
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>the list of rooms</p>
	</div>
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Return the list of Rooms from a specific Room Group</p>
	</div>
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="../Classes/SFSRoom.html">SFSRoom</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/httpUploadURI" title="httpUploadURI"></a>
	<h3 class="subsubtitle method-title">httpUploadURI</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns the HTTP URI that can be used to upload files to, using regular HTTP POST.
For more details on how to use this functionality see the <a href='http://docs2x.smartfoxserver.com/AdvancedTopics/file-uploads' target='_blank'>Upload File</a> tutorial</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (NSString *)httpUploadURI</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Returns the HTTP URI that can be used to upload files to, using regular HTTP POST.
For more details on how to use this functionality see the <a href='http://docs2x.smartfoxserver.com/AdvancedTopics/file-uploads' target='_blank'>Upload File</a> tutorial</p>

<p>NOTE: this property will return null if no API configuration has been set or the local User is not already logged in the server.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/initSmartFoxWithDebugMode:delegate:" title="initSmartFoxWithDebugMode:delegate:"></a>
	<h3 class="subsubtitle method-title">initSmartFoxWithDebugMode:delegate:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Initializes SmartFox Client</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (id)initSmartFoxWithDebugMode:(BOOL)<em>debug</em> delegate:(id&lt;ISFSEvents&gt;)<em>delegate</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>debug</em></dt>
			<dd><p>(BOOL) determines debugging mode.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>delegate</em></dt>
			<dd><p>(id <a href="../Protocols/ISFSEvents.html">ISFSEvents</a>) delegate object that listens api events.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Initializes SmartFox Client</p>
	</div>
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="#//api/name/smartFoxWithDebugMode:delegate:">+ smartFoxWithDebugMode:delegate:</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/initUDP:::" title="initUDP:::"></a>
	<h3 class="subsubtitle method-title">initUDP:::</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Initialize the UDP Manager to create a UDP connection. If the host and port parameters are left nil and -1</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (void)initUDP:(NSString *)<em>udpHost</em> :</code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>udpHost</em></dt>
			<dd><p>(NSString *) the host (IP) of the SFS Server</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>udpPort</em></dt>
			<dd><p>(NSInteger) the port of the SFS Server to handle UDP</p>

<pre><code>-(void)onLogin:(SFSEvent *)evt
{
    NSArray *keys = [evt.params allKeys];
    for (NSString *key in keys)
    {
        // do somthing...
    }
    //initialize the UDP socket
    [smartFox initUDP :nil :-1];
}
</code></pre></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Initialize the UDP Manager to create a UDP connection. If the host and port parameters are left nil and -1</p>

<p>The UDP Manager will use the settings found in the config XML. UDP is only available through an ExtensionRequest.</p><div class="warning"><p><strong>Warning:</strong> <em><b>Important:</b></em>
It is recommended to initialize the UDP connection after successful login to a zone.</p></div>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/killConnection" title="killConnection"></a>
	<h3 class="subsubtitle method-title">killConnection</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Simulate an abrupt disconnection</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (void)killConnection</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Simulate an abrupt disconnection</p>

<p>To be used for testing/simulations only.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/loadConfig:connectOnSuccess:" title="loadConfig:connectOnSuccess:"></a>
	<h3 class="subsubtitle method-title">loadConfig:connectOnSuccess:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Load a client configuration file.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (void)loadConfig:(NSString *)<em>filePath</em> connectOnSuccess:(BOOL)<em>connectOnSuccess</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>filePath</em></dt>
			<dd><p>(NSString *) external xml configuration file name (optional).</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>connectOnSuccess</em></dt>
			<dd><p>(BOOL) a boolean flag indicating if the connection to SmartFoxServer must be attempted upon configuration loading completion.</p>

<p><b>Usage Note:</b><br/>
The external xml configuration file has the following structure; ip, port and zone parameters are mandatory, all other parameters are optional.</p>

<pre><code> &lt;SmartFoxConfig&gt;
     &lt;ip&gt;127.0.0.1&lt;/ip&gt;
     &lt;port&gt;9933&lt;/port&gt;
     &lt;udpHost&gt;127.0.0.1&lt;/udpHost&gt;
     &lt;udpPort&gt;9934&lt;/udpPort&gt;
     &lt;zone&gt;BasicExamples&lt;/zone&gt;
     debugtrue&lt;/debug&gt;
     useBlueBoxtrue&lt;/useBlueBox&gt;
     &lt;httpPort&gt;8080&lt;/httpPort&gt;
     &lt;blueBoxPollingRate&gt;750&lt;/blueBoxPollingRate&gt;
 &lt;/SmartFoxConfig&gt;
</code></pre>

<p><b>Example:</b><br/>
The following example shows how to load an external configuration file.</p>

<pre><code>[smartfox loadConfig:@"sfs-config.xml" connectOnSuccess:NO];

-(void)onConfigLoadSuccess:(SFSEvent *)evt
{
    NSLog(@"Config file loaded, now connecting...");
    [smartFox connect:smartFox.ipAddress, smartFox.port];
}

 -(void)onConfigLoadFailure:(SFSEvent *)evt
{
    NSLog(@"Failed loading config file: %@", [evt.params objectForKey:@"message"]);
}
</code></pre></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Load a client configuration file.</p>

<p>The SmartFox2XClient instance can be configured through an external xml configuration file loaded at run-time.
By default, the loadConfig method loads a file named sfs—config.xml, placed in the main bundle of the application.
If the connectOnSuccess parameter is set to <b>YES</b>, on loading completion the connect:port: method is automatically called by the API, otherwise the onConfigLoadSuccess event is dispatched.
In case of a loading error, the onConfigLoadFailure (ISFSEvents) event is fired.</p><div class="warning"><p><strong>Warning:</strong> <em><b>Important:</b></em> The SmartFox2XClient configuration file (client-side) should not be confused with the SmartFoxServer configuration file (server-side).</p></div>
	</div>
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="../Protocols/ISFSEvents.html#//api/name/onConfigLoadSuccess:">[ISFSEvents onConfigLoadSuccess:]</a></p></code></li>
			
			<li><code><p><a href="../Protocols/ISFSEvents.html#//api/name/onConfigLoadFailure:">[ISFSEvents onConfigLoadFailure:]</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/send:" title="send:"></a>
	<h3 class="subsubtitle method-title">send:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Sends a request to the Server.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (void)send:(id&lt;IRequest&gt;)<em>request</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>request</em></dt>
			<dd><p>(id <a href="../Protocols/IRequest.html">IRequest</a>) a request object.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Sends a request to the Server.</p>

<p>All the available request objects are found in the documentation.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/setClientDetails:::" title="setClientDetails:::"></a>
	<h3 class="subsubtitle method-title">setClientDetails:::</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Allows to specify custom client details what will be used to gather statistics about the client platform via the Analytics Module. By default no details are sent.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (void)setClientDetails:(NSString *)<em>platformId</em> :</code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>platformId:</em></dt>
			<dd><p>(NSString *) The id of the runtime platform: for example &ldquo;Unity WebPlayer&rdquo; or &ldquo;iOS&rdquo;.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>version:</em></dt>
			<dd><p>(NSString *) An optional version of the runtime platform: for example &ldquo;2.0.0&rdquo;.</p>

<pre><code>[smartFox setClientDetails:@"MyPlatform" :@"version 001"];
</code></pre></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Allows to specify custom client details what will be used to gather statistics about the client platform via the Analytics Module. By default no details are sent.</p>

<p>This method must be called before the connection is started.
    The length of the two strings combined must be &lt; 512 characters.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SmartFox2XClient.h</code><br />
	</div>				
	
	
</div>
						
					</div>
					
					
                    
                    
				</div>
				<div class="main-navigation navigation-bottom">
					<ul>
	<li><a href="../index.html">Index</a></li>
	<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
				</div>
				<div id="footer">
					<hr />
					<div class="footer-copyright">
						<p><span class="copyright">&copy; 2014 gotoAndPlay() / A51 Integrated. All rights reserved. (Last updated: 2014-10-13)</span><br />
						
						<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 963)</a>.</span></p>
						
					</div>
				</div>
			</div>
		</article>
		<script type="text/javascript">
			function jumpToChange()
			{
				window.location.hash = this.options[this.selectedIndex].value;
			}
			
			function toggleTOC()
			{
				var contents = document.getElementById('contents');
				var tocContainer = document.getElementById('tocContainer');
				
				if (this.getAttribute('class') == 'open')
				{
					this.setAttribute('class', '');
					contents.setAttribute('class', '');
					tocContainer.setAttribute('class', '');
					
					window.name = "hideTOC";
				}
				else
				{
					this.setAttribute('class', 'open');
					contents.setAttribute('class', 'isShowingTOC');
					tocContainer.setAttribute('class', 'isShowingTOC');
					
					window.name = "";
				}
				return false;
			}
			
			function toggleTOCEntryChildren(e)
			{
				e.stopPropagation();
				var currentClass = this.getAttribute('class');
				if (currentClass == 'children') {
					this.setAttribute('class', 'children open');
				}
				else if (currentClass == 'children open') {
					this.setAttribute('class', 'children');
				}
				return false;
			}
			
			function tocEntryClick(e)
			{
				e.stopPropagation();
				return true;
			}
			
			function init()
			{
				var selectElement = document.getElementById('jumpTo');
				selectElement.addEventListener('change', jumpToChange, false);
				
				var tocButton = document.getElementById('table_of_contents');
				tocButton.addEventListener('click', toggleTOC, false);
				
				var taskTreeItem = document.getElementById('task_treeitem');
				if (taskTreeItem.getElementsByTagName('li').length > 0)
				{
					taskTreeItem.setAttribute('class', 'children');
					taskTreeItem.firstChild.setAttribute('class', 'disclosure');
				}
				
				var tocList = document.getElementById('toc');
				
				var tocEntries = tocList.getElementsByTagName('li');
				for (var i = 0; i < tocEntries.length; i++) {
					tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
				}
				
				var tocLinks = tocList.getElementsByTagName('a');
				for (var i = 0; i < tocLinks.length; i++) {
					tocLinks[i].addEventListener('click', tocEntryClick, false);
				}
				
				if (window.name == "hideTOC") {
					toggleTOC.call(tocButton);
				}
			}
			
			window.onload = init;
			
			// If showing in Xcode, hide the TOC and Header
			if (navigator.userAgent.match(/xcode/i)) {
				document.getElementById("contents").className = "hideInXcode"
				document.getElementById("tocContainer").className = "hideInXcode"
				document.getElementById("top_header").className = "hideInXcode"
			}
			
		</script>
	</body>
</html>